home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / PrometheusSDK / Developer / prometheus.doc < prev   
Encoding:
Text File  |  1980-11-11  |  5.3 KB  |  146 lines

  1. TABLE OF CONTENTS
  2.  
  3. prometheus.library/Prm_FindBoardTagList
  4. prometheus.library/Prm_GetBoardAttrsTagList
  5. prometheus.library/Prm_FindBoardTagListrometheus.library/Prm_FindBoardTagList
  6.  
  7.    NAME
  8.        Prm_FindBoardTagList -- Finds PCI board with attributes given in the
  9.                taglist.
  10.        Prm_FindBoardTags -- Varargs stub for Prm_FindBoardTagList.
  11.  
  12.    SYNOPSIS
  13.        Board = Prm_FindBoardTagList (Previous, TagList)
  14.                                      A0        A1
  15.  
  16.        APTR Prm_FindBoardTagList (APTR, struct TagItem*);
  17.  
  18.        Board = Prm_FindBoardTags (Previous, Tag1, ...)
  19.  
  20.        APTR Prm_FindBoardTags (APTR, ULONG, ...);
  21.  
  22.    FUNCTION
  23.        Finds all PCI boards connected to any Prometheus PCI bridge in the
  24.        system, matching the tags in the TagList. First call returns first
  25.        matching board found. To find all the matching boards call the
  26.        function in loop until it returns NULL.
  27.  
  28.    INPUTS
  29.        Previous  - pointer to a "blackbox" PCI board structure. The function
  30.                    will search board list from the *next* board after
  31.                    Previous. NULL value means "start search from the
  32.                    beginning of internal list".
  33.        TagList   - list of tags all boards will be checked against.
  34.  
  35.    RESULT
  36.        Board     - a pointer to a "blackbox" PCI board structure. Don't try
  37.                    to peeking and pokeing it, use only as a parameter in
  38.                    prometheus.library calls. Function can return NULL if no
  39.                    [more] matching boards can be found.
  40.  
  41.    EXAMPLE
  42.        Let's check if any Voodoo3 2000 board is plugged in:
  43.  
  44.        APTR board = NULL;
  45.  
  46.        while (board = Prm_FindBoardTags (board, PRM_Vendor,
  47.         0x121A, PRM_Device, 5, TAG_END))
  48.         {
  49.          /* do something with 'board' */
  50.         }
  51.  
  52.    NOTES
  53.        Don't give random values as Previous board. It should be only pointer
  54.        returned by Prm_FindBoardTagList() call or NULL.
  55.  
  56.    BUGS
  57.  
  58.    SEE ALSO
  59.        Prm_GetBoardAttrsTagList()
  60.  
  61. prometheus.library/Prm_GetBoardAttrsTagLists.library/Prm_GetBoardAttrsTagList
  62.  
  63.    NAME
  64.        Prm_GetBoardAttrsTagList -- reads information about PCI board.
  65.        Prm_GetBoardAttrsTags -- Varargs stub for Prm_GetBoardAttrsTagList.
  66.  
  67.    SYNOPSIS
  68.        Prm_GetBoardAttrsTagList (Board, TagList)
  69.                                  A0     A1
  70.  
  71.        void Prm_GetBoardAttrsTagList (APTR, struct TagItem*);
  72.  
  73.        Prm_GetBoardAttrsTags (Board, Tag1, ...)
  74.  
  75.        void Prm_GetBoardAttrsTags (APTR, ULONG, ...);
  76.  
  77.    FUNCTION
  78.        Reads information from board internal structure and writes it
  79.        according to given taglist. Function looks for every passed tag value
  80.        in database and if found writes its value at address given in ti_Data
  81.        in passed TagList.
  82.  
  83.    INPUTS
  84.        Board   - "Blackbox" structure pointer returned by
  85.                  Prm_FindBoardTagList(). It can be NULL, function returns
  86.                  immediately in the case, no data are written. Don't pass
  87.                  random values here.
  88.        TagList - Function will search in internal database for every ti_Tag
  89.                  in the TagList. If tag is found, ti_Data field is used as a
  90.                  pointer to ULONG and the information is written at the
  91.                  address. Unrecognized tags are skipped and 0 is written to
  92.                  the given ti_Data location. TagList can be NULL,
  93.                  function returns immediately at the case, no data are
  94.                  written. Following tags are recognized:
  95.  
  96.        PRM_Vendor      - Board vendor number assigned by PCISIG.
  97.        PRM_Device      - Device number assigned by manufacturer.
  98.        PRM_Revision    - Device revision number assigned by manufacturer.
  99.        PRM_Class       - Device class as defined in PCI specification.
  100.        PRM_SubClass    - Device subclass as defined in PCI specification.
  101.        PRM_MemoryAddrX - (where X can be from '0' to '5'), PCI board can have
  102.            up to six memory blocks allocated. These tags contains base
  103.            adresses of blocks assigned by prometheus.library in init code.
  104.            NULL value means a block is not used.  You can depend on fact that
  105.            the last nybble of PRM_MemoryAddrX is equal to X. It is
  106.            guarranted in future releases. So the code below is valid:
  107.  
  108.        /* read all possible base adresses */
  109.  
  110.        ULONG baseaddr;
  111.  
  112.        for (i = 0; i < 6; i++)
  113.         {
  114.          Prm_GetBoardAttrsTags (any_board, PRM_MemoryAddr0 + i,
  115.           (ULONG)&baseaddr, TAG_END);
  116.         }
  117.  
  118.        PRM_MemorySizeX - where X can be from '0' to '5'), PCI board can have
  119.            up to six memory blocks allocated. These tags contains sizes
  120.            of blocks assigned by prometheus.library in init code. NULL value
  121.            means a block is not used.  You can depend on fact that the last
  122.            nybble of PRM_MemorySizeX is equal to X. It is guarranted in
  123.            future releases (see code above).
  124.        PRM_ROM_Address - Address of PCI on-board ROM (if found).
  125.        PRM_ROM_Size - Size of PCI on-board ROM (if found).
  126.    RESULT
  127.        None.
  128.  
  129.    EXAMPLE
  130.        Get first base address and block size of the card:
  131.  
  132.        ULONG baseaddress;
  133.        ULONG blocksize;
  134.  
  135.        Prm_GetBoardAttrsTags (any_board,
  136.          PRM_MemoryAddr0, (ULONG)&baseaddress,
  137.          PRM_MemorySize0, (ULONG)&blocksize,
  138.          TAG_END);
  139.  
  140.    NOTES
  141.  
  142.    BUGS
  143.  
  144.    SEE ALSO
  145.  
  146.